/**
* \file UDPSocket.h
* \brief UDPSocket decleration class
* \author Edouard ROGE
* \date 12 Novembre 2013
*/
#ifndef _UDPSOCKET_
#define _UDPSOCKET_

#include "Network.h"
#include "Core/Network/IUDPSocket.h"
#include "Core/Memory/HeapObject.h"

class UDPSocket : public IUDPSocket, public HeapObject
{
public:

	/**
	 * \fn UDPSocket();
	 * \brief Default constructor
	 */
	UDPSocket();
	
	/**
	 * \fn virtual ~UDPSocket();
	 * \brief Destructor
	 */
	virtual ~UDPSocket();

	/**
	* \fn virtual void Send(void * _pBuffer, uint32 _iSize);
	* \brief Send data through the socket
	*/
	NETWORK_LINUX virtual void Send(void * _pBuffer, uint32 _iSize);

	/**
	* \fn virtual void Receive(void * _pBuffer, uint32 _iSize);
	* \brief Receive data through the socket
	*/
	NETWORK_LINUX virtual void Receive(void * _pBuffer, uint32 _iSize);

	/**
	* \fn virtual void Close();
	* \brief Close socket
	*/
	NETWORK_LINUX virtual void Close();

private:

	/** Socket descriptor, we use the socket features through it */
	int32 m_iDescriptor;
};


#endif // _UDPSOCKET_
